package cn.edu.pku.ss.situationawareperceiver.dbrecords;

import org.alljoyn.bus.annotation.Position;

public class ContextRequestRecord {
	/**
	 * Define a inner class as RetrieveType
	 */
	public enum RetrieveType{
		@Position(1)
		FROM_EXISTING_CONTEXTS,
		
		@Position(2)
		FROM_LOCAL_SENSORS,
		
		@Position(3)
		FROM_PROXIMITY,
	}
	
//	int id;
	String requesterId;
	int queringContextTypeId;
	int retriveTypeInt;
	String requestTime;
//	int reasoningSerialNumber;	//Foreign key to the id of SRARecords table 
	
	public ContextRequestRecord( String requesterId,
			int queringContextTypeId, int retriveTypeInt, String requestTime
			) {
		super();
		this.requesterId = requesterId;
		this.queringContextTypeId = queringContextTypeId;
		this.retriveTypeInt = retriveTypeInt;
		this.requestTime = requestTime;
	}
	
	public ContextRequestRecord(String requesterId,
			int queringContextTypeId, RetrieveType retriveType, String requestTime) {
		super();
		this.requesterId = requesterId;
		this.queringContextTypeId = queringContextTypeId;
		this.retriveTypeInt = retriveType.ordinal();
		this.requestTime = requestTime;
	}


	public String getRequesterId() {
		return requesterId;
	}

	public void setRequesterId(String requesterId) {
		this.requesterId = requesterId;
	}


	public int getQueringContextTypeId() {
		return queringContextTypeId;
	}

	public void setQueringContextTypeId(int queringContextTypeId) {
		this.queringContextTypeId = queringContextTypeId;
	}

	public int getRetriveTypeInt() {
		return retriveTypeInt;
	}

	public void setRetriveTypeInt(int retriveTypeInt) {
		this.retriveTypeInt = retriveTypeInt;
	}

	public String getRequestTime() {
		return requestTime;
	}

	public void setRequestTime(String requestTime) {
		this.requestTime = requestTime;
	}

	
	
}
